package com.example.administrator.mydialog;

import android.content.DialogInterface;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

       final GameOverDialog gameOverDialog = new GameOverDialog(MainActivity.this);
        gameOverDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
            @Override
            public void onCancel(DialogInterface dialog) {

            }
        });
        findViewById(R.id.tv_Show).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {gameOverDialog.show();
            }
        });

    }
}
